package view;

import java.awt.Graphics;
import java.net.URL;

import javax.swing.ImageIcon;
import javax.swing.JPanel;

@SuppressWarnings("serial")
class ImagePanel extends JPanel {
	
    private ImageIcon image;
    
    public ImagePanel(URL url) {
    	image = new ImageIcon(url);
    }
    
    @Override
    protected void paintComponent(Graphics g) {
    	g.drawImage(image.getImage(), 0, 0, getWidth(), getHeight(), this);
    }
    
}
